function act() {
    var d = cm.getEventInstance();
    var c = d.getEventManager();
    var f = c.getMapFactoryMap(cm.getMapId());
    for (var a = 0; a < 3; a++) {
        for (var b = 0; b < randomNum(0, 5); b++) {
            var e = c.getMonster(8240026 + a);
            f.spawnMonsterOnGroundBelow(e, new java.awt.Point(randomNum(-2000, 600), randomNum(-400, 60)))
        }
    }
}

function randomNum(b, a) {
    switch (arguments.length) {
        case 1:
            return parseInt(Math.random() * b + 1, 10);
            break;
        case 2:
            return parseInt(Math.random() * (a - b + 1) + b, 10);
            break;
        default:
            return 0;
            break
    }
};